package com.anche.cywebnew.Pojo.systemManager;

import com.anche.cywebnew.Utils.Regex.RegexType;
import com.anche.cywebnew.Utils.annotation.DV;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Date;


/**
 * @description：用户
 * @author：zhixuan.wang @date：2015/10/1 14:51
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "vehispara")
public class SysUser implements Serializable {

    private String id;

    @DV(description = "登录名", maxLength = 64, nullable = false)
    private String loginname;

    @DV(description = "人员姓名", maxLength = 64, nullable = false)
    private String name;

    @DV(description = "密码", maxLength = 64, nullable = true)
    private String password;

    private Integer sex;

    @DV(description = "年龄", maxLength = 3, nullable = true, regexType = RegexType.NUMBER)
    private Integer age;

    private Integer usertype;

    @DV(description = "用户状态", nullable = false)
    private Integer status;

    @DV(description = "所属机构", maxLength = 12, nullable = false)
    private String organ;

    private Date createdate;

    @DV(description = "电话", maxLength = 15, nullable = true)
    private String phone;

    // 关联内容--角色
    @DV(description = "角色", nullable = false)
    private String role_id;

    private Integer errortimes;

    private Date locktime;

    @DV(description = "身份证明号码", nullable = true)
    private String sfzhm;

    @DV(description = "身份证明证件类型", nullable = true)
    private String sfztype;//1-身份证 2-警官证 3-其他

    @DV(description = "登录IP集", nullable = true)
    private String ips;

    @DV(description = "账户有效期", nullable = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date zhyxq;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DV(description = "密码有效期", nullable = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date mmyxq;

    @DV(description = "上次登录时间", nullable = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date scdlsj;

    @DV(description = "上次登录IP", nullable = true)
    private String scdlip;

    @DV(description = "校验位", nullable = true)
    private String jyw;

    @DV(description = "工作开始时间", nullable = false)
    private String daystart;

    @DV(description = "工作结束时间", nullable = false)
    private String dayend;

    @DV(description = "更新日期")
    private Date gxrq;

    @DV(description = "是否警员")
    private String ispolice;

    @DV(description = "警员编号", nullable = true)
    private String jybh;

    @DV(description = "用户ID", nullable = true)
    private String userid;

    private int isupdate;      // 用于返回给前端识别数据是否被篡改，0--未篡改   1--篡改（不是数据库字段）

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLoginname() {
        return loginname;
    }

    public void setLoginname(String loginname) {
        this.loginname = loginname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getUsertype() {
        return usertype;
    }

    public void setUsertype(Integer usertype) {
        this.usertype = usertype;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getOrgan() {
        return organ;
    }

    public void setOrgan(String organ) {
        this.organ = organ;
    }

    public Date getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRole_id() {
        return role_id;
    }

    public void setRole_id(String role_id) {
        this.role_id = role_id;
    }

    public Integer getErrortimes() {
        return errortimes;
    }

    public void setErrortimes(Integer errortimes) {
        this.errortimes = errortimes;
    }

    public Date getLocktime() {
        return locktime;
    }

    public void setLocktime(Date locktime) {
        this.locktime = locktime;
    }

    public String getSfzhm() {
        return sfzhm;
    }

    public void setSfzhm(String sfzhm) {
        this.sfzhm = sfzhm;
    }

    public String getSfztype() {
        return sfztype;
    }

    public void setSfztype(String sfztype) {
        this.sfztype = sfztype;
    }

    public String getIps() {
        return ips;
    }

    public void setIps(String ips) {
        this.ips = ips;
    }

    public Date getZhyxq() {
        return zhyxq;
    }

    public void setZhyxq(Date zhyxq) {
        this.zhyxq = zhyxq;
    }

    public Date getMmyxq() {
        return mmyxq;
    }

    public void setMmyxq(Date mmyxq) {
        this.mmyxq = mmyxq;
    }

    public Date getScdlsj() {
        return scdlsj;
    }

    public void setScdlsj(Date scdlsj) {
        this.scdlsj = scdlsj;
    }

    public String getScdlip() {
        return scdlip;
    }

    public void setScdlip(String scdlip) {
        this.scdlip = scdlip;
    }

    public String getJyw() {
        return jyw;
    }

    public void setJyw(String jyw) {
        this.jyw = jyw;
    }

    public String getDaystart() {
        return daystart;
    }

    public void setDaystart(String daystart) {
        this.daystart = daystart;
    }

    public String getDayend() {
        return dayend;
    }

    public void setDayend(String dayend) {
        this.dayend = dayend;
    }

    public Date getGxrq() {
        return gxrq;
    }

    public void setGxrq(Date gxrq) {
        this.gxrq = gxrq;
    }

    public String getJybh() {
        return jybh;
    }

    public void setJybh(String jybh) {
        this.jybh = jybh;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getIspolice() {
        return ispolice;
    }

    public void setIspolice(String ispolice) {
        this.ispolice = ispolice;
    }

    public int getIsupdate() {
        return isupdate;
    }

    public void setIsupdate(int isupdate) {
        this.isupdate = isupdate;
    }
}